from typing import Annotated, Optional

from pydantic import Field

from owl_common.base.model import AuditEntity, VoAccess


class LLMModel(AuditEntity):
    """
    大模型配置实体
    """
    id: Annotated[
        int,
        Field(default=None, vo=VoAccess(query=True))
    ]

    # api类型：ollama、openai等
    api_type: Annotated[
        str,
        Field(default=None, vo=VoAccess(query=True))
    ]

    # 模型名称
    model_name: Annotated[
        str,
        Field(default=None, vo=VoAccess(query=True))
    ]

    # 访问地址
    api_host: Annotated[
        str,
        Field(default=None, vo=VoAccess(query=True))
    ]

    # 访问密钥
    api_key: Annotated[
        Optional[str],
        Field(default=None, vo=VoAccess(query=True))
    ]

    model_describe: Annotated[
        Optional[str],
        Field(default=None, vo=VoAccess(query=True))
    ]
